Skip to content

feat: add bigint column type support and update dependencies#2950

Merged
ArnabChatterjee20k merged 22 commits intomainfrom
big-int
May 8, 2026
Merged

feat: add bigint column type support and update dependencies#2950
ArnabChatterjee20k merged 22 commits intomainfrom
big-int

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 1, 2026

Greptile Summary

This PR introduces bigint as a new column type for the table database UI, backed by a SDK bump to v8. It also adapts several call sites to SDK v8 breaking changes: renaming MethodIdAuthMethod, updateRuleVerificationupdateRuleStatus, and moving the domain search parameter into a Query.search() call.

  • BigInt column support: adds bigint.svelte for column creation/editing, buildPayload/castBigIntValue helpers to serialize bigint row values as strings before API submission, and wires bigint into faker, column type lists, row editors, and the spreadsheet view.
  • SDK v8 migration: renames exported auth/proxy identifiers and updates domain query construction across functions, sites, and project settings pages.

Confidence Score: 4/5

Mostly safe to merge; one defect in the bigint row serialization path will cause API errors when a bigint field holds an empty string.

The castBigIntValue function in rows/store.ts forwards an empty string directly to the API instead of converting it to null. Every code path that saves a row with a bigint column (create, edit, spreadsheet, editRelated) goes through buildPayload, so this affects all row-write operations on bigint fields when the value is empty. The rest of the changes — SDK rename adaptations, domain query migration, and the new bigint.svelte form component — look correct.

src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/store.ts

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/store.ts Adds RowValue type and buildPayload/castBigIntValue helpers for bigint serialization; castBigIntValue returns empty string instead of null, which will cause API errors on empty bigint fields
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/bigint.svelte New BigInt column form component with normalizeBigInt guard; correctly validates non-integer floats; uses InputNumber which cannot represent values beyond Number.MAX_SAFE_INTEGER
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/+page.svelte Adds bigint to the numeric column branch; type cast now includes Models.ColumnBigint alongside Integer and Float
src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/columns/types/string.svelte bigint case falls through to the integer case in parseValue and placeholder helpers, reusing parseInt-based parsing
src/lib/components/domains/status.ts normalizeProxyRuleStatus now compares against string literal 'created' instead of ProxyRuleStatus.Created enum value, aligning with SDK v8 changes
src/lib/stores/auth-methods.ts Adapts to SDK rename from MethodId to AuthMethod, imported as MethodId alias for backward compatibility
src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/+page.ts Migrates search from a dedicated API parameter to Query.search() within the queries array, matching SDK v8 API surface
src/lib/helpers/faker.ts Adds bigint case to faker value generator using faker.number.bigInt().toString()
src/lib/helpers/types.ts Adds 'bigint' to the columnTypes list

Comments Outside Diff (1)

  1. src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/rows/store.ts, line 60-66 (link)

    Empty string passes through to the API as-is. When a bigint field has an empty-string value (e.g. from an uninitialized binding), castBigIntValue returns '' rather than null, so buildPayload forwards it to the API unchanged. The API will reject '' for a numeric column and surface a confusing error. Treating empty string the same as null/undefined is the safe choice.

Reviews (13): Last reviewed commit: "updated" | Re-trigger Greptile

- Updated bigint column type handling in the database table columns.
- Refactored input components to use InputText for bigint values with validation.
- Improved parsing and error handling for bigint inputs in string representation.
- Adjusted type definitions to include bigint in various contexts.
- Added bigint type to the Columns type definition.
- Updated bigint input handling in the bigint.svelte component, replacing InputText with InputNumber for better user experience.
- Enhanced data binding and validation for bigint values, including min, max, and default settings.
- Adjusted column value handling in various components to accommodate bigint type.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 9, 2026

Tip:

Greploop — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.

Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

tableId: page.params.table,
rowId: row.$id,
data: row
data: buildPayload(columns, row as Record<string, unknown>)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why unknown here instead of a typed row?
Do we not know the shape,
Can't we define a type?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@ArnabChatterjee20k ArnabChatterjee20k merged commit 264e2de into main May 8, 2026
4 checks passed
@ArnabChatterjee20k ArnabChatterjee20k deleted the big-int branch May 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants